Component({
    properties: {},
    data: {
        popShow: !1,
        day_list: [],
        day_index: 0,
        time_list: [],
        time_index: null
    },
    methods: {
        setPopShow: function() {
            this.setData({
                popShow: !this.data.popShow
            });
        },
        setListData: function(t) {
            var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
            0 != t.length && (this.setData({
                day_list: t,
                time_list: t[0].time_arr
            }), 1 == i && (this.setDayIndex(0), this.setTimeIndex(0), this.confirm()));
        },
        setDayIndex: function(t) {
            var i = t.currentTarget ? t.currentTarget.dataset.index : t;
            this.data.day_index != i && this.setData({
                day_index: i,
                time_index: null,
                time_list: this.data.day_list[i].time_arr
            });
        },
        setTimeIndex: function(t) {
            var i = t.currentTarget ? t.currentTarget.dataset.index : t;
            this.setData({
                time_index: i
            });
        },
        confirm: function() {
            var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null;
            if (null != this.data.time_index) {
                var i = this.data.time_list[this.data.time_index];
                i.day = this.data.day_list[this.data.day_index].day, this.triggerEvent("confirm", i), 
                null != t && this.setPopShow();
            }
        }
    }
});